{% extends "base.html" %}

{% block title %}My OAuth2 Active Sessions{% endblock %}

{% block content %}

<img class="logo" src="/pics/oauth2-logo.png" />
   
   {% if sessions %}
  
   
   <table>
   
   <tr>
            <th>Application</th>
            <th>Access Token</th>
            <th>Manage</th>
   </tr>
   
   {% for session in sessions %}
   
        <tr>
            <td>{{ session.application.name }}</td>
            <td>{{ session.access_token }}</td>
            <td>
                <form method="post">
                    <input type="hidden" name="session_id" value="{{ session.key().id() }}" />
                    <input type="submit" name="submit" value="Revoke" />
                </form>
            </td>
        </tr>
   
   {% endfor %}
   
   </table>
   
   {% else %}
   
   <p>There are currently no active OAuth2 sessions.</p>
   
   {% endif %}

{% endblock %}